package day008.itheima_02;

import java.util.Arrays;
import java.util.Random;

public class ArrayTest03 {
    public static void main(String[] args) {
        int[] arr = {12, 45, 98, 73, 60};
        System.out.println(Arrays.toString(arr));
        Random rand = new Random();

        for (int i = 0; i < arr.length; i++) {
            int index = rand.nextInt(arr.length);

            int temp = arr[i];
            arr[i] = arr[index];
            arr[index] = temp;
        }

        System.out.println(Arrays.toString(arr));
    }
}
